import React, { PureComponent } from 'react';
import { Provider } from 'react-redux';
import Sidebar from './sidebar';
import { createStore } from './redux';
import I18nProvider from './i18n';

const store = createStore();

class FormDesigner extends PureComponent {
  render() {
    const { desktopValue, mobileValue, onChange, metaValue } = this.props;
    return (
      <Provider store={store}>
        <I18nProvider>
          <Sidebar
            onChange={onChange}
            desktopValue={desktopValue}
            mobileValue={mobileValue}
            metaValue={metaValue}
          />
        </I18nProvider>
      </Provider>
    );
  }
}

export default FormDesigner;
